<!DOCTYPE html>
<html lang="en">
<head> 
<meta charset="UTF-8"> 
<title>DOM 事件处理示例</title> 
</head> 
<body>  
<button id="myButton">点击我</button>   
<script>    
var button = document.getElementById('myButton');     
button.addEventListener('click', function() {      
alert('你点击了按钮！');    
});   
</script> 
</body> 
</html>